requestScreenCapture();

sendmaila("/sdcard/Pictures/wxda.jpg");


sleep(800);

click(150, 804);

sleep(500);

id("add_attachment_btn").findOne().click();

sleep(500);
click(600, 850);

// let target = $images.read('youjiantubiao.jpg');
// let pos = $images.findImage(wx, target);


// captureScreen("a.jpg");
// let wx = captureScreen();


// if (null != pos ) {
//     log(pos)
//     click("坐标:" + pos.x, pos.y);
// } else {
//     log("未找到")
// }







function sendmaila(filepath) {
    app.sendEmail({
        email: ["1049725878@qq.com"],
        subject: "这是一个邮件标题",
        text: "这是邮件正文",
        attachment: filepath
    });
    

    // sleep(2000);
    // click(101, 800);
    // sleep(2000);

    // click(654, 110);
    // sleep(500);
}
